﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IndoorPosition.Server.Application
{
    public interface IConfigurationService
    {
        /// <summary>
        /// 添加参数
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        /// <exception cref="Exception"></exception>
        Task AddAsync(ConfigurationInputDto input);

        /// <summary>
        /// 添加或更新参数
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task AddOrUpdateAsync(ConfigurationInputDto input);

        /// <summary>
        /// 获取参数
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        Task<ConfigurationDto> GetAsync(string key);

        /// <summary>
        /// 获取所有参数列表
        /// </summary>
        /// <returns></returns>
        Task<List<ConfigurationDto>> ListAsync();

        /// <summary>
        /// 更新参数
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task UpdateAsync(ConfigurationDto input);

        /// <summary>
        /// 删除参数
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task DeleteAsync(int id);
    }
}
